﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PrimaryStudentPainProgram
{
    public partial class MainForm : Form
    {
        ParentForm parentForm;
        public MainForm(ParentForm parentForm)
        {
            InitializeComponent();
            this.parentForm = parentForm;
            this.WindowState = FormWindowState.Maximized;
            comboBoxAmount.Items.Add(10);
            comboBoxAmount.Items.Add(20);
            comboBoxAmount.Items.Add(30);
            comboBoxInterval.Items.Add(60);
            comboBoxInterval.Items.Add(40);
            comboBoxInterval.Items.Add(20);
        }

        private void buttonStart_Click(object sender, EventArgs e)
        {
            try
            {
                parentForm.MAX_NUM = int.Parse(comboBoxAmount.Text);
                parentForm.INTERVAL = int.Parse(comboBoxInterval.Text);
                parentForm.wrongList.Clear();
                parentForm.start();
            }catch (Exception) { }
        }
    }
}
